package com.ityu.controller;

import com.ityu.pojo.result.Result;
import com.ityu.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/report")
public class ReportController {

    @Autowired
    private ReportService reportService;

    @GetMapping("/empJobData")
    public Result empJobData() {
        log.info("-----EmpJobDataController----- 统计部门信息！");
        return Result.success(reportService.EmpJobData());
    }

    @GetMapping("/empGenderData")
    public Result empGenderData() {
        log.info("-----EmpGenderDataController----- 统计员工性别信息！");
        return Result.success(reportService.EmpGenderData());
    }


    @GetMapping("/studentDegreeData")
    public Result StudentDegreeData(){
        log.info("-----StudentDegreeDataController-----学生学历统计!");
        return Result.success(reportService.StudentDegreeData());
    }

    @GetMapping("/studentCountData")
    public Result clazzData(){
        log.info("-----ClazzDataController-----班级统计!");
        return Result.success(reportService.ClazzData());
    }

}
